<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "me_user_drawal_record".
 *
 * @property integer $id
 * @property integer $userid
 * @property string $wxopenid
 * @property string $partner_trade_no
 * @property string $payment_no
 * @property string $payment_time
 * @property double $amount
 */
class UserDrawalRecord extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'me_user_drawal_record';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['userid', 'wxopenid', 'partner_trade_no', 'payment_no', 'payment_time', 'amount'], 'required'],
            [['userid'], 'integer'],
            [['amount'], 'number'],
            [['wxopenid'], 'string', 'max' => 50],
            [['partner_trade_no', 'payment_no', 'payment_time'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'userid' => 'Userid',
            'wxopenid' => 'Wxopenid',
            'partner_trade_no' => '商户订单号',
            'payment_no' => '微信订单号',
            'payment_time' => '微信支付成功时间',
            'amount' => '提现金额',
        ];
    }
}
